Edge detection based on edge mapping, i.e., mapping out the edges of objects in an image by using image data obtained with an image sensor, is used in a variety of applications, such as autofocusing and movement detection. One way to produce an edge map is to first obtain image data with an image sensor that includes color (red, green, and blue) and panchromatic (clear or white) pixels, and then generate a reference panchromatic image in response to the captured panchromatic pixel signals. For a position in this image that is occupied by a panchromatic pixel, the captured panchromatic signal for that pixel is readily used. For a position that is occupied by a color pixel, there is no captured panchromatic signal for that pixel, so nearby panchromatic pixels are interpolated to provide an estimated panchromatic value for that pixel position. As a result, every pixel position will have a panchromatic value, either captured or interpolated. Once the reference panchromatic image is generated, an edge map is produced by applying edge-forming techniques such as digital filtration.